export interface ResponseData {
  code: number
  message: string
  ok: boolean
}

/**
 * 角色的ts数据类型
 */
export interface Role {
  id?: number
  createTime?: string
  updateTime?: string
  roleName: string
  remark?: string
}

/**
 * 角色数据集合(数组)
 */
export type Roles = Role[]

/**
 * 角色信息获取接口返回的ts数据类型
 */
export interface RoleResponseData extends ResponseData {
  data: {
    roles: Roles
    total: number
    size: number
    current: number
    orders: []
    optimizeCountSql: boolean
    hitCount: boolean
    countId: null
    maxLimit: null
    searchCount: boolean
    pages: number
  }
}

/**
 * 权限数据的ts类型
 */
export interface Menu {
  id: number
  createTime: string
  updateTime: string
  pid: number
  name: string
  code: string
  toCode: string
  type: number
  status: null
  level: number
  children?: MenuList
  select: boolean
}

/**
 * 权限数据集合(数组)
 */
export type MenuList = Menu[]

/**
 * 权限信息获取接口返回数据的ts类型
 */
export interface MenuResponseData extends ResponseData {
  data: MenuList
}
